package d0317;

public class CreateThreadByExtends extends Thread {
    public void run(){
        System.out.println("CreateThreadByExtend is running.");
        System.out.println(currentThread().getName());
    }

    public static void main(String[] args) {
        CreateThreadByExtends createThreadByExtends = new CreateThreadByExtends();
        createThreadByExtends.setName("ct1");
        CreateThreadByExtends createThreadByExtends2 = new CreateThreadByExtends();
        createThreadByExtends2.setName("ct2");
       // CreateThreadByExtends.run();错误的调用方法
    }
}
